package org.ghl.javase;

public class BuSiShenTu {
    public static void main(String[] args) {
        int[] tuNanber = new int[20];
        tuNanber[0] = tuNanber[1] = 1;
        sumTu(tuNanber);
        bTest(22);

    }

    public static void sumTu(int[] tuNanber) {
        int sum = 2;//每个月兔子数量做累加
        int tui = 0;//单月兔子数量
        for (int i = 2; i < tuNanber.length; i++) {
            tuNanber[i] = tuNanber[i - 2] + tuNanber[i - 1];
            sum += tuNanber[i];
            tui = tuNanber[i];

        }
        System.out.println(sum);
        System.out.println(tui);
    }

    public static void bTest(int b) {
        int a;
        int c;
        a = b;
        c = a + b;
        System.out.println(c);


    }
}
